import {reqCategoryList} from "@/apis";

const state = {
//    三级分类
    categoryList:[]
}
const getters = {}
const mutations = {
    CATEGORYLIST_STATE(state,{categoryList}){
        state.categoryList = categoryList
    }
}
const actions = {
//    获取三级分页
    async getCategoryList({commit}){
        const res = await reqCategoryList()
        commit('CATEGORYLIST_STATE',{categoryList:res})
    }
}

export default {
    namespaced:true,
    state,
    getters,
    mutations,
    actions
}